import { DisabledProps, PermissionProps, VisibleProps } from "@/components/Permission"
import { FormItemRule } from "naive-ui"

/**
 * 表单属性
 */
export interface GetanFormProps {
    items: GetanFormItemProps[]
    inline?: boolean
    labelWidth?: number | string | "auto"
}

export type InputType = "text" | "textarea" | "password" | "selector" | "checkbox" | "radio"

/**
 * 表单项属性
 */
export interface GetanFormItemProps extends PermissionProps, DisabledProps, VisibleProps {
    data?: Ref<Recordable>
    type?: InputType
    property: string
    label?: string
    labelWidth?: number | string | "auto"
    rule?: FormItemRule | FormItemRule[]
    size?: "small" | "medium" | "large"
    // 组件特定属性
    inputProps?: Recordable
}
